using System;
using Engine.OldSerialization;

namespace RuthlessConquest {
    public struct PlayerDescription {
        public class Serializer : ISerializer<PlayerDescription> {
            public void Serialize(InputArchive archive, ref PlayerDescription value) {
                archive.Serialize("Faction", ref value.Faction);
                archive.Serialize("Type", ref value.Type);
                archive.Serialize("Name", ref value.Name);
                archive.Serialize("Guid", ref value.Guid);
                archive.Serialize("Platform", ref value.Platform);
            }

            public void Serialize(OutputArchive archive, PlayerDescription value) {
                archive.Serialize("Faction", value.Faction);
                archive.Serialize("Type", value.Type);
                archive.Serialize("Name", value.Name);
                archive.Serialize("Guid", value.Guid);
                archive.Serialize("Platform", value.Platform);
            }
        }

        public Faction Faction;

        public PlayerType Type;

        public string Name;

        public Guid Guid;

        public Platform? Platform;
    }
}